package com.wang.web3;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;

public class PropsDetailActivity extends AppCompatActivity {


    private ImageView iv_girl;
    private Button btn_buy;
    private int propId;
    private String categoryName, itempic;
    private TextView tv_owner, tv_name;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.girl_detail);
        propId = getIntent().getIntExtra("propId", 0);
        categoryName = getIntent().getStringExtra("categoryName");
        itempic = getIntent().getStringExtra("itempic");
        initView();
        doPropsDetailTask();
    }

    private void initView() {
        iv_girl = findViewById(R.id.iv_girl);
        btn_buy = findViewById(R.id.btn_buy);
        tv_name = findViewById(R.id.tv_name);
        tv_owner = findViewById(R.id.tv_owner);
    }

    public void doPropsDetailTask() {
        Glide.with(getApplicationContext()).load(itempic).into(iv_girl);
        tv_name.setText(categoryName);
//        Business.getInstance().doPropsDetailTask(girlId, new ICallBackListener() {
//            @Override
//            public void onSuccess(String mCallBackVo) {
//                Gson mGson = new Gson();
//                MarketGirlDetailBean girlDetailBean = mGson.fromJson(mCallBackVo, MarketGirlDetailBean.class);
//                Log.i("zjf", girlDetailBean + "");
//                Glide.with(getApplicationContext()).load(girlDetailBean.getData().getPicBody()).into(iv_girl);
//
//
////                mGirlListArrayList.addAll(girlBean.getData());
////                mGirlAdapter.notifyDataSetChanged();
//            }
//
//            @Override
//            public void onFaild(String mCallBackVo) {
//
//            }
//        });
    }
}
